$(function() {
	$('#nav').tree({
		url: basePath+"/resources/json/tree.json",
		method: 'get',
		lines: false,
		onClick: function(node) {
			if (node.url) {
				window.frames[0].location.href = basePath + node.url;
			}
		},
		onLoadSuccess:function(node, data){
			if(data){
				var node = $('#nav').tree('find', 5);  
				$('#nav').tree('select', node.target);
			}
		}
	});
	$(".navbg").css("height",$(window).height()-66);
	$(window).resize(function(){
		$(".navbg").css("height",$(window).height()-66);
//		window.frames[0].location.reload();
	});
	
	$('.layout_lefter').niceScroll({ 
	    cursorcolor: "#f7f7f7",
	    cursoropacitymax: 1,
	    touchbehavior: false, 
	    cursorwidth: "1px",
	    cursorborder: "0", 
	    cursorborderradius: "1px",
	    autohidemode: true
	});
});